package LinkedList;

public class TestLinkedList {
    public static void main(String[] args){
        MyLinkedList mlk = new MyLinkedList();
        System.out.println("=====头插=====");
        mlk.addFirst(12);
        mlk.addFirst(23);
        mlk.addFirst(34);
        mlk.display();
        System.out.println(mlk.size());

        System.out.println("=====尾插=====");
        mlk.addLast(34);
        mlk.addLast(23);
        mlk.addLast(12);
        mlk.display();
        System.out.println(mlk.size());

        /*System.out.println("=====随便插=====");
        mlk.addIndex(2,33);
        mlk.addIndex(3,44);
        mlk.addIndex(0,55);
        mlk.addIndex(8,66);
        mlk.display();
        System.out.println(mlk.size());*/

        System.out.println("=====是否包含=====");
        System.out.println(mlk.contain(12));
        System.out.println(mlk.contain(999));

        System.out.println("=====删除第一个出现的关键字=====");
        mlk.remove(12);
        mlk.display();


    }
}
